
#ifndef __APP_MAIN_H__
#define __APP_MAIN_H__


/* Includes ------------------------------------------------------------------*/
#include "stm32f2xx.h"
#include "mt-camera.h"
#include <stdio.h>	// printf()
#include <string.h>	// memcpy()
#include <time.h>	// ctime()
#if		defined(BSP_APP)
#include <math.h>	// atanf(), tanf()
#endif	//BSP_APP


/* Exported define -----------------------------------------------------------*/
/* Exported types ------------------------------------------------------------*/
/* Includes ------------------------------------------------------------------*/
#if		defined(BSP_DEVICE_TOUCH)
#include "usbd_conf.h"
#include "usbd_hid_core.h"
#include "usbd_usr.h"
#include "usbd_desc.h"
#include "app_usb.h"
#if		defined(BSP_APP)
#include "app_pwm.h"
#include "app_touch.h"
#include <stdlib.h>	// qsort()
#endif	//BSP_APP
#endif	//BSP_DEVICE_TOUCH

#if		defined(BSP_APP) && defined(BSP_DEVICE_CAMERA)
#include "app_swi2c.h"
#include "app_cmos.h"
#endif	//BSP_DEVICE_CAMERA

#include "stm32_util.h"

#include "app_flash_if.h"
#include "app_flash_eeprom.h"
#include "app_led.h"
#include "app_uart.h"
#include "app_pkt.h"

#include "data_type.h"


/* Exported constants --------------------------------------------------------*/
/* Exported macro ------------------------------------------------------------*/
/* Exported functions ------------------------------------------------------- */
/* External variables --------------------------------------------------------*/
extern vu32 g_vu32SysTickCount;
extern u8 g_u8CurState;
extern u8 g_u8MyAddr;
extern u8 g_u8OsType;

#if		defined(BSP_DEVICE_TOUCH)
extern u32 g_u32BuzzerDelay;
extern USB_OTG_CORE_HANDLE g_UsbOtgDevice;
extern TOUCHCONFIG_DATA g_TCD;
extern GESTURE_DATA g_GD;
extern u32 g_u32TimeTap;
extern u32 g_u32TimeLTap;
extern float g_fAreaTap;
extern float g_fAreaDTap;
extern float g_fAreaPalm;
#elif	defined(BSP_DEVICE_CAMERA)
extern CAMERACONFIG_DATA g_CCD;
#endif	//BSP_DEVICE_xxx


#define	DBG_MSG_CMOS		1
#define	DBG_MSG_APP			1
#define	DBG_MSG_PKT			1
#define	DBG_MSG_UART		1
#define	DBG_MSG_USB			1
#define	DBG_MSG_IAP			1
#define	DBG_MSG_HID			1
#define	DBG_MSG_TOUCH		1


#endif /*__APP_MAIN_H__*/

